﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Bovril.Rodney.Core
{
    internal class EventHierarchy : IEventHierarchy
    {
        internal EventHierarchy(ServiceClient serviceClient)
        {
            serviceClient_ = serviceClient;
            Refresh();
        }

        #region IEventHierarchy Implementation
        public IEvent[] RootEvents { get; private set; }

        public void Refresh()
        {
            RootEvents = serviceClient_.GetActiveEvents();
        }
        #endregion IEventHierarchy Implementation

        private ServiceClient serviceClient_;
    }
}
